<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xhtml xsl">
	<xsl:output method="html" media-type="text/xhtml" omit-xml-declaration="yes" 
	version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
	
	<xsl:template match="nav"> 
		<div id="nav" lang="__language__" xml:lang="__language__">
		<ul>
			<xsl:for-each select="link">
				<xsl:choose>
					<xsl:when test="@nameFile = //page/@pageName">
						<li><xsl:value-of select="." /></li>
					</xsl:when>
					<xsl:otherwise>
						<li><a href="{@nameFile}.html"><xsl:value-of select="." /></a></li>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</ul>

		<h1><xsl:value-of select="categories" /></h1>
			<ul>
				<xsl:choose>
					<xsl:when test="allCategories/@nameFile = //page/@pageName">
						<li><xsl:value-of select="allCategories" /></li>
					</xsl:when>
					<xsl:otherwise>
						<li><a href="{allCategories/@nameFile}.html"><xsl:value-of select="allCategories" /></a></li>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:comment>§§start</xsl:comment><li>
					<a href="__categoryLinkINDEX__">__categoryINDEX__</a>
				</li><xsl:comment>§§end</xsl:comment>			
			</ul>
		</div> <!-- nav -->
	</xsl:template>
		
</xsl:stylesheet>
